<template>
  <div class="act_item___1">
    <div>{{ actTime }}</div>
    <div>{{ actTitle }}</div>
  </div>
</template>

<script>
export default {
  name: 'Activity',
  props: {
    act: {
      // 活动
      type: Object,
      required: true,
    },
  },
  data() {
    return {
      item: this.act,
    };
  },
  computed: {
    actTime: function () {
      let t = this.item.start.substring(11, 16);
      if (!!this.item.end) {
        t = t + '-' + this.item.end.substring(11, 16);
      }
      return t;
    },
    actTitle: function () {
      let type = '其他';
      if (this.item.scheme == 1) {
        type = '沙龙';
      } else if (this.item.scheme == 2) {
        type = '客情';
      } else if (this.item.scheme == 3) {
        type = '生日';
      }
      return type + '-' + this.item.kname;
    },
  },
};
</script>

<style lang="scss" scoped>
.act_item___1 {
  font-family: 思源黑体 微软雅黑 Noto Sans SC-Medium;
  font-size: 12px;
  font-weight: 500;
  line-height: 15px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  letter-spacing: 0px;
  font-variation-settings: 'opsz' auto;
}
</style>
